using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TextEditor.TextDocument.frmWindow
{
    public partial class frmMessageBox : DevComponents.DotNetBar.Office2007Form
    {
        public bool IsZZCheck
        {
            get { return this.cbZZ.Checked; }
        }

        private bool succeed = false;

        public bool Succeed
        {
            get { return succeed; }
            set { succeed = value; }
        }

        public bool IsZRCheck
        {
            get { return this.cbZR.Checked; }
        }

        public frmMessageBox()
        {
            InitializeComponent();
        }

        private void cbZZ_Click(object sender, EventArgs e)
        {
            CheckBox box = sender as CheckBox;
            switch (box.Name)
            {
                case "cbZZ":
                    {
                        if (box.Checked)
                        {
                            this.cbZR.Checked = false;
                        }
                    }
                    break;
                case "cbZR":
                    {
                        if (box.Checked)
                        {
                            this.cbZZ.Checked = false;
                        }
                    }
                    break;
            }
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            this.Succeed = true;
            this.Close();
        }     
    }
}